﻿using Furion;
using Furion.DatabaseAccessor;
using Microsoft.Extensions.DependencyInjection;
using MyProject.Data.DbContexts;
using MyProject.Util.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyProject.Data
{
    public class Startup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            // 数据库访问注册
            services.AddDatabaseAccessor(options =>
            {
                // 注册数据库访问上下文
                options.AddDbPool<DefaultDbContext>(DbProvider.SqlServer);
            });
        }
    }
}